﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Program
    {
        static void Main(string[] args)
        {
            Tiger t = new Tiger();
            t.Leg = 4;
            t.Walk();
            t.Sleep();
            t.Eat();
            t.cry();
            t.Novegetarianism();

            Console.WriteLine("-------------------------------------");

            Cat c = new Cat();
            c.Leg = 4;
            c.Walk();
            c.Sleep();
            c.Eat();
            c.cry();
            c.Catchmoth();
            c.Catchmoth();

            Console.WriteLine("-------------------------------------");
            Eagle e = new Eagle();
            e.Leg = 2;
            e.Walk();
            e.Sleep();
            e.Eat();
            e.cry();
            e.Fly();

            Console.WriteLine("-------------------------------------");
            Swallow s = new Swallow();
            s.Leg = 2;
            s.Walk();
            s.Sleep();
            s.Eat();
            s.cry();
            s.Fly();
            s.Nesting();
            Console.WriteLine("-------------------------------------");

            Console.WriteLine("欢迎来到宠物店，请问你要寄存神末动物：1.猫；2.老虎；3.燕子；4.老鹰");
            int key = int.Parse(Console.ReadLine());
            Animal A;
            switch (key)
            {
                case 1:
                    A = new Cat();
                    break;
                case 2:
                    A = new Tiger();
                    break;
                case 3:
                    A = new Swallow();
                    break;
                case 4:
                    A = new Eagle();
                    break;
                default:
                    Console.WriteLine("输入错误");
                    A = new Tiger();
                    break;
            }
            PetStore ps = new PetStore();
            ps.ConsignAnimal(A);
        }
    }
}
